Optimal. Leaf size=27 \[ \frac {\log (\cos (c+d x))}{d}+\frac {\tan ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 3556}
\begin {gather*} \frac {\tan ^2(c+d x)}{2 d}+\frac {\log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rubi steps
\begin {align*} \int \tan ^3(c+d x) \, dx &=\frac {\tan ^2(c+d x)}{2 d}-\int \tan (c+d x) \, dx\\ &=\frac {\log (\cos (c+d x))}{d}+\frac {\tan ^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 25, normalized size = 0.93 \begin {gather*} \frac {2 \log (\cos (c+d x))+\tan ^2(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 29, normalized size = 1.07
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}}{d}\) | \(29\) |
default | \(\frac {\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}}{d}\) | \(29\) |
norman | \(\frac {\tan ^{2}\left (d x +c \right )}{2 d}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(31\) |
risch | \(-i x -\frac {2 i c}{d}+\frac {2 \,{\mathrm e}^{2 i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 31, normalized size = 1.15 \begin {gather*} -\frac {\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 27, normalized size = 1.00 \begin {gather*} \frac {\tan \left (d x + c\right )^{2} + \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 32, normalized size = 1.19 \begin {gather*} \begin {cases} - \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {\tan ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \tan ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs.
\(2 (25) = 50\).
time = 0.68, size = 246, normalized size = 9.11 \begin {gather*} \frac {\log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 2 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right ) \tan \left (c\right ) + \tan \left (d x\right )^{2} + \tan \left (c\right )^{2} + \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) + 1}{2 \, {\left (d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 2 \, d \tan \left (d x\right ) \tan \left (c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.51, size = 30, normalized size = 1.11 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,d}-\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________